<template>
  <div class="tuwen">
    <h3>{{tuwen.title}}</h3>
    <hr>
    <div class="content" v-html="tuwen.content"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      id: this.$route.params.id,
      tuwen: {}
    };
  },
  created() {
    this.getTuwen();
  },
  methods: {
    getTuwen() {
      this.$http.get("api/goods/getdesc/" + this.id).then(res => {
        console.log(res.body.message);
        this.tuwen = res.body.message[0];
      });
    }
  }
};
</script>
<style lang="less" >
.tuwen {
  text-align: center;
  padding: 10px;
  h3 {
    color: blue;
    font-size: 14px;
    margin-bottom: 5px;
  }
  .content {
    p {
      img {
        width: 100%;
      }
    }
  }
}
</style>